package com.code.day17;

import java.lang.reflect.Array;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;

public class Demo15Stream {
    public static void main(String[] args) {
        Collection<String> collection1 = new ArrayList<>();
        collection1.add("王语嫣");
        collection1.add("段誉");
        collection1.add("段正淳");
        collection1.add("段延庆");
        System.out.println(collection1);
        Collection<String> collection2 = new ArrayList<>();
        collection2.add("虚竹");
        collection2.add("乔峰");
        collection2.add("慕容复");
        collection1.addAll(collection2);
        System.out.println(collection1);
        System.out.println("============");

//        collection1.clear();
//        System.out.println(collection1);
        System.out.println(collection1.isEmpty());
        System.out.println(collection1.size());
        System.out.println(collection1.contains("段延庆"));
        Object[] array = collection1.toArray();
        System.out.println(array);
        System.out.println(Arrays.toString(array));

    }
}
